﻿@using Microsoft.AspNet.Identity
@if (Request.IsAuthenticated)
{
    using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" }))
    {
    @Html.AntiForgeryToken()

    <ul class="nav navbar-nav navbar-right">
        <li>
            <span class="glyphicon glyphicon-user" style="color: rgb(200, 153, 107); font-size: 15px;margin-top:15px;">@Html.ActionLink("管理员" + User.Identity.GetUserName() + "，你好!", "Index", "Manage", routeValues: null, htmlAttributes: new { title = "Manage" })
            </span>
        </li>
        <li><span class="glyphicon glyphicon-off" style="color: rgb(200, 153, 107); font-size: 16px;margin-top:15px;margin-left:20px;"><a href="javascript:document.getElementById('logoutForm').submit()">注销</a></span></li>
    </ul>
    }
}
else
{
    @*<ul class="nav navbar-nav navbar-right">
        <li>@Html.ActionLink("注册", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })</li>
        <li>@Html.ActionLink("登录", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })</li>
    </ul>*@
}
